//
//  MyCollectionViewController.m
//  PlayerFix
//
//  Created by DAT on 15/11/10.
//  Copyright © 2015年 DAT. All rights reserved.
//

#import "MyCollectionViewController.h"
#import "MyCollectionViewCell.h"

@interface MyCollectionViewController ()<UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UIView *naView;
@property (nonatomic, strong) UILabel *naTitle;
@property (nonatomic, strong) UITableView *bgTableView;

@end

@implementation MyCollectionViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.naView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 64)];
    self.naView.backgroundColor = [UIColor colorWithRed:30 / 255.0 green:80 / 255.0 blue:100 / 255.0 alpha:1];
    [self.view addSubview:self.naView];
    
    self.naTitle = [[UILabel alloc] initWithFrame:CGRectMake((375 - 100) / 2, 25, 100, 30)];
    self.naTitle.backgroundColor = [UIColor clearColor];
    self.naTitle.textColor = [UIColor whiteColor];
    self.naTitle.textAlignment = NSTextAlignmentCenter;
    self.naTitle.font = [UIFont boldSystemFontOfSize:18];
    self.naTitle.text = @"我的收藏";
    [self.naView addSubview:self.naTitle];
    
    UIButton *goBackBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    goBackBtn.frame = CGRectMake(10, 25, 30, 30);
    goBackBtn.backgroundColor = [UIColor clearColor];
    [goBackBtn setBackgroundImage:[UIImage imageNamed:@"backBtn.png"] forState:UIControlStateNormal];
    [goBackBtn addTarget:self action:@selector(goBackAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.naView addSubview:goBackBtn];
    
    self.bgTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 64, 375, 667 - 64)];
    self.bgTableView.backgroundColor = [UIColor cyanColor];
    self.bgTableView.delegate = self;
    self.bgTableView.dataSource = self;
    self.bgTableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
    [self.view addSubview:self.bgTableView];

}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    static NSString *identifier = @"cell";
    MyCollectionViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    if (!cell) {
        
        cell = [[MyCollectionViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}

- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 100;
}


- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    return 100;
}
- (void)goBackAction:(UIButton *)btn{
    
    [self dismissViewControllerAnimated:YES completion:^{
        
        
    }];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
